import SelectCompanyAndProject from '@/components/Select/SelectCompanyAndProject.vue'
import OrgTreeSelect from '@/components/OrgTreeSelect'
const anualConBase = {
  // 填写中：WRITING，审核中：SUBMITTED，审核通过：PAST，审核不通过：REJECTED，已发布：PUBLISHED） 
  statusMap: {
    'WRITING': '填写中',
    'SUBMITTED': '审核中',
    'PAST': '审核通过',
    'REJECTED': '审核不通过',
    'PUBLISHED': '已发布'
  },
  searchArr: [
    {
        name: '年度',
        value: 'year',
        type: 'year',
    },
    {
      name: '编制单位',
      valueKey: 'searchQuery',
      type: OrgTreeSelect,
    },
    // {
    //     name: '编制单位',
    //     valueKey: 'unitId',
    //     type: SelectCompanyAndProject,
    //     autoSelect: true
    // },
    {
        name: '状态',
        value: 'planStatus',
        type: 'select',
        // 填写中：WRITING，审核中：SUBMITTED，审核通过：PAST，审核不通过：REJECTED，已发布：PUBLISHED
        data: [
            {
                value: 'WRITING',
                label: '填写中',
            },
            {
                value: 'SUBMITTED',
                label: '审核中',
            },
            {
                value: 'REJECTED',
                label: '审核不通过',
            },
            {
                value: 'PAST',
                label: '审核通过',
            },
            {
                value: 'PUBLISHED',
                label: '已发布',
            },
        ],
    },
  ],
  columns: [
    {
      title: '序号',
      width: '65px',
      scopedSlots: { customRender: 'serial' }
    },
    {
        title: '年度',
        width: '100px',
        dataIndex: 'year',
    },
    {
        title: '编制单位',
        ellipsis: true,
        dataIndex: 'unitName',
    },
    {
        title: '计划填写部门数量',
        // width: '150px',
        dataIndex: 'planWriteDeptSum',
    },
    {
        title: '已填写部门数量',
        // width: '140px',
        dataIndex: 'wroteDeptSum',
    },
    {
        title: '总预算（元）',
        // width: '120px',
        dataIndex: 'totalBudget',
    },
    {
        title: '会议计划状态',
        dataIndex: 'planStatus',
        // width: '130px',
        scopedSlots: { customRender: 'status' },
    },
    {
        title: '操作',
        dataIndex: 'operation',
        width: '230px',
        scopedSlots: { customRender: 'operation' },
    },
  ],
  tableData: [
    { id: '1', year: '2021', unit: '西南公司', planfillNum: '12', filledNum: '10', total: '100,000', status: 10 },
    { id: '2', year: '2020', unit: '武汉分公司', planfillNum: '13', filledNum: '10', total: '100,000', status: 20 },
    { id: '3', year: '2020', unit: '四川分公司', planfillNum: '13', filledNum: '6', total: '100,000', status: 30 },
    { id: '4', year: '2020', unit: '西南公司', planfillNum: '12', filledNum: '6', total: '100,000', status: 40 },
    { id: '5', year: '2020', unit: '西南公司', planfillNum: '12', filledNum: '6', total: '100,000', status: 50 },
  ],
  treeData: [
    {
      title: '西南公司',
      value: 'xinan',
      key: 'xinan',
      children: [
        {
          title: '四川分公司',
          value: 'sichuan',
          key: 'sichuan',
          children: [
            {
              title: '项目部1',
              value: 'pro1',
              key: 'pro1',
            },
            {
              title: '项目部2',
              value: 'pro2',
              key: 'pro2',
            }
          ]
        },
        {
          title: '重庆分公司',
          value: 'chongqing',
          key: 'chongqing',
        },
      ],
    }
  ]
}

export default anualConBase
